/*
 * EquipmentBullets.cpp
 *
 *  Created on: Jun 22, 2012
 *      Author: gonzalo
 */

#include "EquipmentBullets.h"
#include "../PlayScenarioPanel.h"

EquipmentBullets::EquipmentBullets(Widget* parent): Equipment(BULLET,parent)  {}

EquipmentBullets::EquipmentBullets(DTOEquipment* dtoEquipment,Widget* parent):Equipment(dtoEquipment, parent){}

void EquipmentBullets::handleEvent(Event event){
	if(event.getKey() == Space)
		((PlayScenarioPanel*)parent)->addAmmo(AMMO_BULLET);
}

void EquipmentBullets::updateStatus(){
	//Do nothing
}
int EquipmentBullets::reduceLife(int value,playElement element){
	return value;
}

void EquipmentBullets::showOn(SDL_Surface* surface,int offsetX,int offsetY) {}

DTOEquipment* EquipmentBullets::getDTO() {
	return new DTOEquipment(BULLET,0,((PlayScenarioPanel*)parent)->getOwner());
}

EquipmentBullets::~EquipmentBullets() {}

